﻿#include <windows.h>
#include <osgDB/ReadFile>
#include <osgViewer/Viewer>
#include <gl/GL.h>

int main(int argc, char** argv)
{
	// Initialize OSG viewer
	osgViewer::Viewer viewer;

	// Load FBX model using osgDB::readNodeFile
	osg::ref_ptr<osg::Node> fbxNode = osgDB::readNodeFile("D://test//lumian.FBX");

	if (fbxNode)
	{
		// Set the loaded node as the scene data for the viewer
		viewer.setSceneData(fbxNode);

		// Run the viewer loop
		return viewer.run();
	}
	else
	{
		OSG_NOTICE << "Failed to load FBX model." << std::endl;
		return 1;
	}
}
